When designing a software application, a programmer decomposes the application into a set of tasks and a group of data structures for those tasks to operate on. The programmer further attempts to find an assignment of tasks to processing cores and an assignment of data structures to data stores. In assigning an operation to a resource, or otherwise determining a resource allocation configuration, the programmer must be sure not to exceed the capacity of any processing core, bus or storage unit. Generally, an optimal configuration for allocating resources will generally balance the load evenly across the available resources. Balancing a load across multiple resources (e.g., balancing the headroom across multiple resources) makes large restructuring requirements less likely should small changes be subsequently required. However, due to the number of potential configurations for any non-trivial system, it is virtually impossible to create an optimal configuration for allocating resources manually (e.g., having the programmer manually determine the assignments). This may be especially true with regard to parallel architectures having multiple resources of a particular type (e.g., multiple processing cores, multiple data stores, etc.).
Automatically allocating resources to the tasks and data structures of the software application in an optimal manner relieves the programmer of this burden. Finding an optimal configuration for allocating operations among the available resources involves searching for such an optimal configuration through all potential configurations (i.e., the search space). For non-trivial systems, such as parallel architectures found in network processors, a conventional brute force search method that generates and evaluates every conceivable configuration could be particularly inefficient. For example, the number of potential configurations for assigning twenty tasks to sixteen microengines yields 1620 potential configurations. Using a brute force search method at a rate of one-hundred thousand configurations per second, it would take hundreds of millions of years to search through and evaluate all potential configurations to provide an exhaustive search for an optimal configuration.
Although the brute force search method may be augmented with termination criteria such as finding the first acceptable configuration, failure to improve the search results within a predetermined number of configurations or evaluating a predetermined maximum number of configurations. However, this may cause the brute force search to terminate prematurely and may not result in an optimal configuration compared with the remaining unsearched configurations. Efforts to make a brute force search method efficient may result in less than optimal configurations.